package com.project.logistics.service.imp;

import com.project.logistics.bean.Evaluate;
import com.project.logistics.mapper.EvaluateMapper;
import com.project.logistics.service.EvaluateService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by94988 on 2021/3/30 16:12
 */
@Service
public class EvaluateServiceImpl implements EvaluateService {
    @Autowired
    EvaluateMapper evaluateMapper;

    @Override
    public Evaluate fingEvaluateById(int repairsId) {
        return evaluateMapper.fingEvaluateById(repairsId);
    }

    @Override
    public int deleteComment(int repairsId) {
        return evaluateMapper.deleteComment(repairsId);
    }

    @Override
    public int deleteAnswer(int repairsId) {
        return evaluateMapper.deleteAnswer(repairsId);
    }
    @Override
    public Evaluate getCommentById(int repairsId){
        return evaluateMapper.getCommentById(repairsId);
    }

    @Override
    public List<Evaluate> getCommentsByRepairsmanId(String repairsmanId){
        return evaluateMapper.getCommentsByRepairsmanId(repairsmanId);
    }

    @Override
    public void insertEvaluate(Evaluate evaluate){
        evaluateMapper.insertEvaluate(evaluate);
    };

    @Override
    public void updateEvaluate(Evaluate evaluate){
        evaluateMapper.updateEvaluate(evaluate);
    };

    @Override
    public void updateEvaluateReply(Evaluate evaluate){
        evaluateMapper.updateEvaluateReply(evaluate);
    }

}
